﻿
using System;
using System.Diagnostics;

namespace Sharp.Infrastructure
{
    /// <summary>
    /// 释放资源
    /// </summary>
    [DebuggerStepThrough]
    public abstract class DisposableObject : IDisposable
    {
        /// <summary>
        /// 释放
        /// </summary>
        /// <param name="disposing"></param>
        protected abstract void Dispose(bool disposing);
        /// <summary>
        /// 释放
        /// </summary>
        public void Dispose()
        {
            Dispose(true);
            GC.SuppressFinalize(this);
        }
    }
}